<template>
	<view class="echo">
		<view class="register">
			<!-- <view class="left"></view> -->
			<view class="left" v-if="merchantData.isApply">审核中</view>
			<view class="left" v-if="merchantData.checkStatus == 2">审核通过</view>
			<view class="left" v-if="merchantData.checkStatus == 3">审核拒绝</view>
			<view class="right" @click="editClick" v-if="!merchantData.isApply">去编辑</view>
		</view>
		<view class="item-card">
			<view class="business-picture">
				<view class="picture-top">营业执照</view>
				<image class="picture-bottom" :src="merchantData.qualificationPicture" mode="heightFix"
					style="width: 140px;height: 85px;"></image>
				<!-- <u--image :showLoading="true" :src="merchantData.qualificationPicture" class="picture-bottom"  width="100px" height="50px"></u--image> -->
			</view>
			<view class="column">
				<view>公司类型</view>
				<view>{{isLegalList[merchantData.isLegal]}}</view>
			</view>
			<view class="column">
				<view>统一社会信用代码</view>
				<view>{{merchantData.legalCardNum}}</view>
			</view>
			<view class="column">
				<view>单位名称</view>
				<view>{{merchantData.legalName}}</view>
			</view>
			<view class="column">
				<view>注册地址</view>
				<view>{{merchantData.legalRegisterAddress}}</view>
			</view>

			<view class="column">
				<view>有效期类型</view>
				<view>{{legalValidityType[merchantData.legalValidityType]}}</view>
			</view>
			<view class="column" v-if="merchantData.legalValidityType == 2">
				<view>有效期日期</view>
				<view>{{merchantData.legalValidity}}</view>
			</view>
			<view class="column" v-if="merchantData.checkStatus == 3">
				<view>拒绝原因</view>
				<view>{{merchantData.reason}}</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		props: {
			merchantData: {
				type: Object,
				default: {},
			},
		},
		data() {
			return {

				echoShow: false,
				legalValidityType: {
					1: '长期有效',
					2: '固定有效期'
				},
				isLegalList: {
					0: '个人',
					1: '机构',
				},


			}
		},
		methods: {
			// 立即编辑
			editClick() {
				console.log(111)
				this.echoShow = false

				this.$emit('send-data', this.echoShow);
			},
		}
	}
</script>

<style lang="scss" scoped>
	.echo {
		margin: 10px;
		padding: 10px;

		.register {
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 10px;

			background-color: white;
			border-radius: 5px;

			.left {
				padding: 5px;
				border: 1px solid #fe5c2d;
				border-radius: 5px;
				color: #fe5c2d;
			}

			.right {
				padding: 5px;
				border: 1px solid #fe5c2d;
				border-radius: 5px;
				color: #fe5c2d;
			}
		}

		.item-card {
			background-color: white;
			margin-top: 20px;
			border-radius: 5px;
			padding: 20px;

			.business-picture {


				.picture-top {
					margin-bottom: 20px;
				}

				.picture-bottom {
					width: 100px;
					height: 50px;
				}
			}

			.column {
				display: flex;
				justify-content: space-between;
				padding: 20px 0;
				border-bottom: 1px solid #eee;
			}
		}
	}
</style>